﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
using System.ComponentModel;
using Sirenix.OdinInspector;
namespace Data
{
    [Serializable]
    public class EventUnitAction : EventData
    {
        [ShowInInspector]
        private String mActionId = String.Empty;
        [XmlAttribute("ActionId"), DisplayName("设置动作ID"), DefaultValue("")]
        public String ActionId { get { return mActionId; } set { mActionId = value; } }
        [ShowInInspector]
        private int mUnitType = 0;
        [XmlAttribute("UnitType"), DisplayName("单元类型，0：父对象，1：子对象"), DefaultValue(0)]
        public int UnitType { get { return mUnitType; } set { mUnitType = value; } }
        [ShowInInspector]
        private int mUnitId = 0;
        [XmlAttribute("UnitId"), DisplayName("单元ID"), DefaultValue(0)]
        public int UnitId { get { return mUnitId; } set { mUnitId = value; } }

        public override EventType Type() { return EventType.UnitAction; }

        public override string ToString()
        {
            return "设置动作ID";
        }

        public override String EventContent()
        {
            return ActionId + " " + UnitType.ToString() + " " + UnitId.ToString();
        }                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
    };
}
